﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using HttpPublish;

namespace HttpSync
{
    static class Program
    {
        internal static PublishConfigration Config;
        internal static bool AutoSync;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            var configFileName = "HttpPublish.json";
            if (args.Length >= 1)
                configFileName = args[0];
            if (args.Length >= 2)
                if (args[1] == "autosync")
                    AutoSync = true;
            Config = PublishConfigration.LoadConfig(configFileName);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new SyncView());
        }
    }
}
